﻿@model IEnumerable<ITProject.WebUI.Models.ProjectUser.ProjectUserMyTaskViewModel>
@{
    ViewBag.Title = "Moje Zadania";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<h2>Panel użytkownika projektu @ViewData["projectName"].ToString()</h2>
<div class="Pmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectMenuControl, 
        new ITProject.WebUI.Models.Project.ProjectMenuViewModel { ProjectName = (string)ViewData["ProjectName"], Role = (ITProject.Domain.UserRole)ViewData["Role"] })
</div>
<div class="PAmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectUserMenu, new List<string> { "Z", ViewData["ProjectName"].ToString() })
@*@Html.ActionLink("Zarządzaj użytkownikami",MVC.ProjectAdmin.ActionNames.ManageTeam, MVC.ProjectAdmin.Name, new { projectName = Model }, null)*@
</div>
<div class="PAplane">
<div>
        <span class="callTH" style="width:25% ;min-height:40px;">
            Nazwa 
        </span>
      
        <span  class="callTH" style="width:26%; min-height:40px;">Status</span>
        <span  class="callTH" style="width:22%; min-height:40px;">Priorytet</span>
        <span  class="callTH" style="width:25%; min-height:40px;">Planowana data zakończenia</span>
 

</div>

<div>
    @{
    int i = 0;
}
@foreach (var item in Model)
{
         i++;
     
        <span style="width:25%; min-height:20px;"  class="call">
            @Html.ActionLink(item.Name,MVC.ProjectUser.ActionNames.MyTaskDetails, MVC.ProjectUser.Name, new { projectName = ViewData["ProjectName"].ToString(), taskId = item.TaskId }, null)
        </span>        
        <span style="width:20%; min-height:20px;" class="call">
            @Html.DisplayFor(modelItem => item.Status) 
        </span>
            <span style="width:9%; min-height:20px;" class="call">
          @Html.ActionLink("Zmień", MVC.ProjectUser.ActionNames.ChangeMyTaskStatus, MVC.ProjectUser.Name, new { projectName = ViewData["ProjectName"].ToString(), taskId = item.TaskId }, null)
        </span>
            <span style="width:19%; min-height:20px;" class="call">
            @Html.DisplayFor(modelItem => item.Priority)
        </span>  
<span style="width:24%; min-height:18px;" class="call">
            @Html.DisplayFor(modelItem => item.PlannedEndDate)
        </span> 
 <hr style="margin: 1px"/>       
}

</div>
</div>
<div class="clear"></div>